package com.wyz.serviceImpl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wyz.entity.Teacher;
import com.wyz.mapper.TeacherMapper;
import com.wyz.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class TeacherServiceImpl implements TeacherService {
    @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
    @Autowired
    TeacherMapper TeacherMapper;

    @Override
    public PageInfo<Teacher> find(int pageNum, int pageSize, String name, String document) {
        Map map = new HashMap();
        map.put("name",name);
        map.put("document",document);
        PageHelper.startPage(pageNum,pageSize);
        return new PageInfo<Teacher>(TeacherMapper.find(map));
    }

    @Override
    public Teacher getLogin(String teacherId, String pwd) {
        return null;
    }
}
